package com.example.shixunandjavagotoyangchen.Activity;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.example.shixunandjavagotoyangchen.R;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

public class Foodbaseadpter2 extends BaseQuickAdapter<FoodJavaBean.DataBean, BaseViewHolder> {

    public Foodbaseadpter2(@Nullable List<FoodJavaBean.DataBean> data) {
        super(R.layout.mianzhubuju, data);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, FoodJavaBean.DataBean dataBean) {
        Glide.with(getContext()).load(dataBean.getPic()).into((ImageView) baseViewHolder.getView(R.id.mins_img));
        baseViewHolder.setText(R.id.mins_text,dataBean.getCollect_num());
    }
}
